package com.cc.model.dto

import com.cc.common.Update
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size
import java.io.Serializable
import java.time.LocalDateTime

/**
 * DTO for {@link com.cc.model.Repository}
 */
data class RepositoryDto(
    @field:NotNull(message = "ID为空", groups = [Update::class]) @field:Size(max = 32) val id: String? = null,
    @field:Size(max = 50) val repName: String? = null,
    @field:Size(max = 10) val repType: String? = null,
    @field:Size(max = 50) val repUsername: String? = null,
    @field:Size(max = 50) val repPassword: String? = null,
    val repBasePath: String? = null,
    @field:Size(max = 10) val dbType: String? = null,
    @field:Size(max = 10) val dbAccess: String? = null,
    @field:Size(max = 50) val dbHost: String? = null,
    @field:Size(max = 10) val dbPort: String? = null,
    @field:Size(max = 20) val dbName: String? = null,
    @field:Size(max = 50) val dbUsername: String? = null,
    @field:Size(max = 50) val dbPassword: String? = null,
    val addTime: LocalDateTime? = null,
    @field:Size(max = 32) val addUser: String? = null,
    val editTime: LocalDateTime? = null,
    @field:Size(max = 32) val editUser: String? = null,
    val delFlag: Int? = null,
) : Serializable